<template>
    <ul class="todo-list">
        <Item v-for="(todo, index) in todos" :key="todo.id" :todo="todo" :index="index" :deleteTodo="deleteTodo"></Item>
    </ul>
</template>
  
<script lang="ts">
import { defineComponent } from 'vue';
import Item from '@/components/Item.vue'

export default defineComponent({
    name: 'List',
    components: {
        Item
    },
    props: ['todos', 'deleteTodo']
})

</script>

<style scoped lang="scss">
.todo-list {
    margin-left: 0px;
    border: 1px solid #ddd;
    border-radius: 2px;
    padding: 0px;
    width: 100%;
}
</style>